<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org" >

  <head>
    <title> .게시판 목록 :::::: Spring 기반 게시판 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" media="all" href="../../css/bbs.css" th:href="@{/css/bbs.css}"/>
  </head>

  <body> 
     
    <div th:include="bbs_header.html::bbs_header"></div>
    
    <div> 
		<h2>
			<a href="bbsBoardList.con">게시판</a>
			&nbsp;::⇒&nbsp;
		</h2>
		<fieldset >
			<legend>게시판 목록</legend>
			
			<ul class="errorlist">
				<li th:text="${ svrMsg }">메시지</li>
				<li th:if="${ errMsg != null and errMsg != '' }" th:text="${ errMsg }">에러</li>
				<li style="vertical-align: middle; " >
					<form action="bbsBoardList.con" method="POST" >
						<img src="../../img/new_icon_02.png" width="40px" th:src="@{ /img/new_icon_02.png }" align="middle" />
						<label for="newBoardName"> 새 게시판 </label>
						<input type="text" name="newBoardName" id="newBoardName" value="" />
						<button type="submit" name="createNewBoard" value="1" style="vertical-align: middle;" > 만들기 </button>
					</form>
				</li>
			</ul>
		</fieldset>
	</div> 

	<br/>
	<div class="entityList" > 
      
      <table>
        <thead>
          <tr> 
            <th width="60px"		> 번호		</th>
            <th						> 이름		</th>
            <th width="100px"		> 관리자		</th>
			<th width="50px"		> 게시물		</th>
            <th width="50px"		> 새글		</th>
            <th width="140px"		> 시간		</th>
          </tr>
        </thead>
        <tbody>
          <tr th:each="board : ${boards}">
            <td style="text-align: center;" >
            	<img src="../../img/record_number_icon.png" width="18px" th:src="@{ /img/record_number_icon.png }" align="middle" />
				&nbsp;
            	<a href="#" th:href="@{bbsBoardView.con( boardId=${ board.BOARD_ID } ) }" th:text="${ #numbers.formatInteger( board.RNO, 3, 'COMMA' ) }"> 번호 </a>
            </td>
            <td style="text-align: left;" >
            	<img src="../../img/board_icon.png" width="16px" th:src="@{ /img/board_icon.png }" align="middle" />
            	&nbsp;
				<a href="#" th:href="@{bbsBoardView.con( boardId=${ board.BOARD_ID } ) }"> 
            		<span  th:text="${ board.BOARD_NAME }" > 게시판 이름 </span>
            	</a> 
            </td>
			<td style="text-align: left;">
				<img src="../../img/manager_icon.png" width="18px" th:src="@{ /img/manager_icon.png }" align="middle" />
				&nbsp;
				<span th:text="${ board.BOARD_USER_NAME }">관리자</span>			
			</td>
			<td th:text="${ board.TOT_PAPER_CNT }"			> 게시물			</td>
			<td th:text="${ board.NEW_PAPER_CNT }"			> 새글			</td>
			<td><img width="14px" src="../../img/clock-2x.png" th:src="@{ /img/clock-2x.png }" align="middle" />&nbsp;&nbsp;<span th:text="${ board.BOARD_UPD_DATE }">시간</span></td>
          </tr>
          <tr th:if="${ boards.size() lt 10 }" th:each="i : ${ #numbers.sequence( boards.size() + 1  , 10 ) } ">
          	<td> &nbsp; </td>
          	<td></td>
          	<td></td>
          	<td></td>
          	<td></td>
          	<td></td>
          </tr>
        </tbody>
		<tfoot>
			<tr >
				<td colspan="1"  > 
					총 <span th:text="${ boards.size() }" >1235</span> 건   
				</td>  
				<td colspan="5"  style="text-align: right;">  
					<div class="pageList">
						<span th:each=" page: ${ boards.pageList } ">
							<a  th:if="${ page.enabledPage }"
								class="" th:class="${ page.currentPage ? 'activePage' : '' }" 
								href="#" th:href="@{ bbsBoardList.con( viewPageNo=${ page.pageNo } ) }"
								th:text="${ page.pageDesc }" 
								title="" th:title="${ page.title }"
							>
								pageNo
							</a>
							<a  th:if="${ ! page.enabledPage }"
								class="" th:class="disabledPage" 
								href="#" 
								th:text="${ page.pageDesc }" 
								title="" th:title="${ page.title }"
							>
								pageNo
							</a>
						</span> 
					</div>
				</td>
			</tr>
		</tfoot>
      </table>  
	</div>
	
	<br/>
	<div th:include="bbs_footer.html::bbs_footer"></div>
	
  </body>
</html>